package Datalayer;

import java.sql.*;
import java.util.ArrayList;

import model.Dier;


public class MainDatalayer {
	
	protected String url = "jdbc:mysql://db4free.net/prodierentuin";
	protected String user = "veragiorgio";
	protected String pass = "veragiorgio";
	protected Statement stmt;
	protected ResultSet rs;
	protected Connection conn;
	

	public void openConn(){
		try {
			conn = DriverManager.getConnection(url, user, pass);
		} catch (SQLException e) {
			System.out.println("Connectie gevonden!");
			e.printStackTrace();
			System.out.println("Geen connectie");
		}
	}
	
	public void closeConn(){
		try {
			conn.close();
		} catch (SQLException e) {
			System.out.println("Kan connectie niet sluiten!");
			e.printStackTrace();
		}
	}
}
